#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main() {
	int a[] = { 1,2,3,4,5,9,10,11 };
	int b[] = { 2,4,6,8,10,22,33,44,11,9,7,8,5};
	int c[100] = { 0 };
	int size = 0;
	int M = sizeof(a) / sizeof(a[0]);
	int N = sizeof(b) / sizeof(b[0]);
	for (size_t i = 1; i <=M; i++)
	{
		for (size_t j = 1; j <= N; j++) {
			if (a[i-1] == b[j-1]) {
				c[size] = a[i-1];
				size++;
			}
		}
	}
	for (int i = 0; i < size; i++) {
		printf("%d ", c[i]);
	}
	return 0;
}